export default{
  install (Vue, options) {
    Vue.prototype.getDateTime = function (value) {
      var val = new Date(value)
      if (val === undefined) {
        return ''
      }
      var year = val.getFullYear()
      var month = val.getMonth() + 1
      var date = val.getDate()
      var hour = val.getHours()
      var minute = val.getMinutes()
      var second = val.getSeconds()
      return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second
    }
  }
}
